package com.gaogzhen.cas;

/**
 * 测试类
 */
public class TestAccount {
    public static void main(String[] args) {
        Account account1 = new AccountUnsafe(10000);
        Account.multiWithdraw(account1);

        Account account2 = new AccountSynchronized(10000);
        Account.multiWithdraw(account2);

        Account account3 = new AccountCAS(10000);
        Account.multiWithdraw(account3);
    }
}
